// EventController.h
#ifndef _EVENTCONTROLLER_H_
#define _EVENTCONTROLLER_H_
#pragma once
#include <osgGA/GUIEventAdapter>
#include <osgGA/GUIEventHandler>
#include "Model.h"

using namespace osg;
using namespace osgGA;

class Model;
class EventController : public GUIEventHandler
{
private:
	ref_ptr<LoaderMap> view;
	int lastXMouse;
	int lastYMouse;
public:
	EventController(ref_ptr<LoaderMap> view){
		this->view = view;
		this->lastXMouse = 0;
		this->lastYMouse = 0;
	}
	virtual bool handle(const GUIEventAdapter& ea, GUIActionAdapter& aa);
protected:
	virtual ~EventController(){};
};
#endif